﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;


namespace PacoToolKit.SysInfo
{
    public class NetFramework
    {
        private static NetFramework instance;
        public static NetFramework Instance()
        {
            if (instance == null)
                instance = new NetFramework();
            return instance;
        }

        public string OSVersion
        {
            get { return Environment.OSVersion.VersionString; }
        }

        public string CurrentDirectory
        {
            get { return Environment.CurrentDirectory; }
        }

        public string DotNetVersion
        {
            get { return Environment.Version.ToString(); }
        }

        public string MachineName
        {
            get { return Environment.MachineName; }
        }

        public string UserName
        {
            get { return Environment.UserName; }
        }

        public string UserDomainName
        {
            get { return Environment.UserDomainName; }
        }

        /// <summary>

        /// 获取截至到当前时间，操作系统启动的毫秒数(PDA,PC均支持)

        /// </summary>

        public string TickCount
        {
            get { return Environment.TickCount.ToString() + "ms"; }
        }

        /// <summary>

        /// 映射到当前进程的物理内存数(Mb)

        /// </summary>

        public string WorkingSet
        {
            get { return (Environment.WorkingSet / 1024 / 1024).ToString() + "M"; }
        }

    }
}
